//package com.wbk.lotterysystemgateway.filter;
//
//import com.coolgua.common.constant.SessionConstant;
//import com.coolgua.models.entity.User;
//import org.springframework.web.context.request.RequestContextHolder;
//import org.springframework.web.context.request.ServletRequestAttributes;
//
//import javax.servlet.http.HttpServletRequest;
//
///*******************************************************************************
// * @project: rate
// * @package: com.coolgua.common.util
// * @author: wbk
// * @created: 2021/5/1
// * @purpose:
// ******************************************************************************/
//public class UserSessionUtil {
//
//    public static HttpServletRequest getRequest(){
//        return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
//    }
//
//    public static User getCurrentUser() {
//        return (User) getRequest().getAttribute(SessionConstant.USER_SESSION);
//    }
//
//    public static Integer getCurrentUserId() {
//        User user = getCurrentUser();
//        return user.getId();
//    }
//}
